﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="SignUp.aspx.cs" Inherits="SignUp" Title="Sign Up - Information Literacy Information" %>

<%@ Register TagPrefix="uc" TagName="UpdateProgress" Src="~/UserControls/UpdateProgress.ascx" %>
<%@ Register TagPrefix="uc" TagName="ModalPopupMessage" Src="~/UserControls/ModalPopupMessage.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="Server">
    <uc:UpdateProgress ID="updateProgress" runat="server" />
    <asp:UpdatePanel ID="UpdatePanel3" runat="server">
        <ContentTemplate>
            <uc:ModalPopupMessage ID="ModalPopupMessage" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <h2>
        Create a New Account for Non-WSU Students
    </h2>
    <div class="indent20">
        <p>
            If you are a non-WSU student or a guest to ILE, please register using the form below.
        </p>
        <p>
            We ask that guests limit their activity to the Sample Class.&nbsp; This will assist
            in generating accurate statistics.
        </p>
        <div style="padding: 10px 20px 20px 0px;">
            <table style="width: 550px;">
                <tr>
                    <td class="tableLeftHeader">
                        Email (as UserID) :
                    </td>
                    <td class="tableItem">
                        <asp:TextBox ID="txtEmail" runat="server" ValidationGroup="CreateAccount" MaxLength="100" Width="200"></asp:TextBox>
                        <br />
                        <asp:RequiredFieldValidator ID="reqfldvalEmail" runat="server" ErrorMessage="* Email is Required."
                            ControlToValidate="txtEmail" ValidationGroup="CreateAccount" Display="Dynamic" />
                        <asp:RegularExpressionValidator ID="regexpvalEmail" runat="server" ErrorMessage="* Must be a vaild Emaill address."
                            Display="Dynamic" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                            ValidationGroup="CreateAccount" ControlToValidate="txtEmail" />
                    </td>
                </tr>
                <tr>
                    <td class="tableLeftHeader">
                        Password :
                    </td>
                    <td class="tableItem">
                        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" MaxLength="50" />
                        <br />
                        <asp:RequiredFieldValidator ID="reqfldvalPassword" runat="server" ErrorMessage="* Password is required."
                            Display="Dynamic" ValidationGroup="CreateAccount" ControlToValidate="txtPassword" />
                    </td>
                </tr>
                <tr>
                    <td class="tableLeftHeader">
                        Retype Password :
                    </td>
                    <td class="tableItem">
                        <asp:TextBox ID="txtPasswordConfirm" runat="server" TextMode="Password" MaxLength="50" />
                        <br />
                        <asp:CompareValidator ID="cmpvalPasswordConfirm" runat="server" ErrorMessage="* Please confirm your password."
                            Display="Dynamic" ControlToValidate="txtPassword" ControlToCompare="txtPasswordConfirm"
                            ValidationGroup="CreateAccount" />
                    </td>
                </tr>
                <tr>
                    <td class="tableLeftHeader">
                        First Name :
                    </td>
                    <td class="tableItem">
                        <asp:TextBox ID="txtFirstName" runat="server" MaxLength="50"></asp:TextBox>
                        <br />
                        <asp:RequiredFieldValidator ID="reqfldvalFirstName" runat="server" ErrorMessage="* First Name is required."
                            Display="Dynamic" ValidationGroup="CreateAccount" ControlToValidate="txtFirstName" />
                    </td>
                </tr>
                <tr>
                    <td class="tableLeftHeader">
                        Last Name :
                    </td>
                    <td class="tableItem">
                        <asp:TextBox ID="txtLastName" runat="server" MaxLength="50"></asp:TextBox>
                        <br />
                        <asp:RequiredFieldValidator ID="reqfldvalLastName" runat="server" ErrorMessage="* Last Name is required."
                            Display="Dynamic" ValidationGroup="CreateAccount" ControlToValidate="txtLastName" />
                    </td>
                </tr>
                <tr>
                    <td class="tableLeftHeader">
                        Institution :
                    </td>
                    <td class="tableItem">
                        <asp:TextBox ID="txtOrganization" runat="server" MaxLength="50" />
                    </td>
                </tr>
                <tr>
                    <td class="tableLeftHeader">
                        Security Question :
                    </td>
                    <td class="tableItem">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" EnableViewState="true"
                            UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:DropDownList ID="ddlistSecurityQuestionExamples" runat="server" AutoPostBack="True"
                                    OnSelectedIndexChanged="ddlistSecurityQuestionExamples_SelectedIndexChanged">
                                    <asp:ListItem Value="0">----------------- Examples -----------------</asp:ListItem>
                                    <asp:ListItem Value="What was your childhood nickname?">What was your childhood nickname?</asp:ListItem>
                                    <asp:ListItem Value="What is the name of your favorite childhood friend?">What is the name of your favorite childhood friend? </asp:ListItem>
                                    <asp:ListItem Value="What street did you live on in third grade?">What street did you live on in third grade?</asp:ListItem>
                                    <asp:ListItem Value="What is your oldest sibling's middle name?">What is your oldest sibling's middle name?</asp:ListItem>
                                    <asp:ListItem Value="What is your oldest cousin's first and last name?">What is your oldest cousin's first and last name?</asp:ListItem>
                                    <asp:ListItem Value="Where does your nearest sibling live?">Where does your nearest sibling live?</asp:ListItem>
                                    <asp:ListItem Value="What was the name of your elementary / primary school?">What was the name of your elementary / primary school?</asp:ListItem>
                                    <asp:ListItem Value="What was the last name of your third grade teacher?">What was the last name of your third grade teacher?</asp:ListItem>
                                    <asp:ListItem Value="What is the name of your favorite Simpson's character?">What is the name of your favorite Simpson's character?</asp:ListItem>
                                </asp:DropDownList>
                                <br />
                                <asp:TextBox ID="txtSecurityQuestion" runat="server" Width="350px" MaxLength="100" />
                                <br />
                                <asp:RequiredFieldValidator ID="reqfldvalSecurityQuestion" runat="server" Display="Dynamic"
                                    ErrorMessage="* Security Question is required." ValidationGroup="CreateAccount"
                                    ControlToValidate="txtSecurityQuestion" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr>
                    <td class="tableLeftHeader">
                        Security Answer :
                    </td>
                    <td class="tableItem">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server" ChildrenAsTriggers="true" EnableViewState="true"
                            UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:TextBox ID="txtSecurityAnswer" runat="server" MaxLength="50" CausesValidation="True" />
                                <br />
                                <asp:RequiredFieldValidator ID="reqfldvalSecurityAnswer" runat="server" Display="Dynamic"
                                    ErrorMessage="* Security Answer is required." ValidationGroup="CreateAccount"
                                    ControlToValidate="txtSecurityAnswer" />
                                <asp:CustomValidator ID="customValidatorSecurityAnswer" runat="server" ErrorMessage="* Security Answer must be more than 4 characters long."
                                    ControlToValidate="txtSecurityAnswer" ValidateEmptyText="true" OnServerValidate="customValidatorSecurityAnswer_ServerValidate"
                                    Display="Dynamic" ValidationGroup="CreateAccount" />
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="btnSignUpOK" EventName="Click" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        &nbsp;<ajaxToolkit:NoBot ID="NoBot1" runat="server" ResponseMinimumDelaySeconds="3" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center;">
                        <asp:Button ID="btnSignUpOK" runat="server" Text="Create Account" ValidationGroup="CreateAccount"
                            Width="130" OnClick="btnSignUpOK_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnGoBack" runat="server" Text="Go Back to Login Screen" Width="200"
                            PostBackUrl="~/Login.aspx" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
